#include "QUAD.h"
#include "graphics.h"

void Quad::Draw()
{
	Gra::DrawQuads(4, ind, (float*)coords, r, g, b );
}

void Quad::Init(Vec3 v1, Vec3 v2, Vec3 v3, Vec3 v4, float r, float g, float b)
{
	/*coords[0]  = v1.x;
	coords[1]  = v1.y;
	coords[2]  = v1.z;

	coords[3]  = v2.x;
	coords[4]  = v2.y;
	coords[5]  = v2.z;

	coords[6]  = v3.x;
	coords[7]  = v3.y;
	coords[8]  = v3.z;

	coords[9]  = v4.x;
	coords[10] = v4.y;
	coords[11] = v4.z;*/

	coords[0] = v1;
	coords[1] = v2;
	coords[2] = v3;
	coords[3] = v4;

	ind[0] = 0;
	ind[1] = 1;
	ind[2] = 2;
	ind[3] = 3;

	this->r = r;
	this->g = g*2;
	this->b = b;

}